package io.lckgroup.modules.lck.entity.wxgzhvo;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;

import java.util.Map;

@Data
public class BaseMessage {
    @XStreamAlias("ToUserName")
    private String toUserName;
    @XStreamAlias("FromUserName")
    private String fromUserName;
    @XStreamAlias("CreateTime")
    private String createTime;
    @XStreamAlias("MsgType")
    private String msgType;

    public BaseMessage(Map<String, String> resultMap) {
        this.toUserName = resultMap.get("FromUserName");
        this.fromUserName = resultMap.get("ToUserName");
        this.createTime = System.currentTimeMillis() / 1000 + "";
    }
}
